<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>假日活动列表</title>
<meta name="viewport"
	content="width=device-width,initial-scale=1,maximum-scale=1.0" />
<#include "/view/admin/head.html"/>

<style type="text/css">
.table-class {
	width: 90%;
	text-align: center;
	border: 1px solid #afd9ee;
	margin: 0 auto;
	margin-top: 50px;
}

.list-path {
	height: 50px;
	line-height: 50px;
	background-color: #9acfea;
}

table th {
	text-align: center;
	WORD-WRAP: break-word;
	width: 100px;
}

table thead tr {
	background-color: #9acfea;
}

.table-query {
	/*height: 40px;*/
	/*width:80px;*/
	/*text-align: center;*/
	white-space: nowrap;
	/*position: relative;*/
	float: left;
	display: inherit;
	/*display: inline;*/
}

.label-head {
	height: 60px;
	width: 100%;
}

.bs-example .input-group {
	width: 300px;
	float: left;
	margin-top: 20px;
}

.bank-label {
	width: 25px;
	float: left;
}

.label-hidden {
	display: none;
}

.panel-body {
	padding-top: 0px;
}
/* .input-group{
            margin-top:20px;
        }*/
</style>
<script type="text/javascript">
	function query(dm) {
		var href = "${base}/userinfo/list?";

		href += 'telephone=' + $('#telephone').val();
		href += '&'
		href += 'carplate=' + $('#carplate').val();
	/* 	href += '&'
			href += 'vip=' + $('#vip').val(); */
		location.href = href;
	}
</script>
</head>
<body>

	<#include "/view/admin/listnav.html"/> 

	<div class="table-class">
		<div class="panel panel-default" style="margin: 10px 50px 10px;">
			<div class="panel-body">
				<form class="bs-example bs-example-form" role="form">

					<div class="input-group">
						<span class="input-group-addon">手机号</span> <input type="text"
							id="telephone" value="${telephone!}" class="form-control"
							placeholder="请输入手机号码">
					</div>
					<span class="bank-label">&nbsp;</span>
						<div class="input-group">
						<span class="input-group-addon">车牌号</span> <input type="text"
							id="carplate" value="${carplate!}" class="form-control"
							placeholder="车牌号">
					</div>
					<span class="bank-label">&nbsp;</span>


					<!-- <div class="input-group">
						<span class="input-group-addon">会员</span> <select id="vip"
							name="vip" class="form-control">
							<option value="">请选择</option>
							<option value="Y"<#if vip ?? &&
								vip=="Y">selected</#if>>是</option>
							<option value="N"<#if vip ?? &&
								vip=="N">selected</#if> >否</option>
						</select>
					</div> -->

					<div class="input-group" style="text-align: right;">
						<a class="btn btn-info" href="javascript:query(this)"><span
							class="glyphicon glyphicon-search"></span> 查找</a>

					</div>
				</form>
			</div>
		</div>

		<#include "/view/admin/opermsg.html"/>
		<table class="table table-hover table-bordered">
			<thead>
			<tr>
				<td>
				总人数：(人)
				</td>
				<td colspan="6" align="left">
				${sunUser!}
				</td>
			</tr>
			<tr>
			<!-- 	<td colspan="4">
				<font style="color: red;font-size: +2">${vip1!}</font>
				</td> 
				<td colspan="4">
				<font style="color: red;font-size: +2">${vip2!}</font>
				</td>
			</tr> -->
				<tr>
					<th>序号</th>
					<th>昵称</th>
					<th>手机号码</th>
					<th>车牌号</th>
					<th>创建时间</th>
						<th>是否可用</th>
					<!-- <th>是否是vip</th> -->

					<th style="width: 150px">操作</th>
				</tr>
			</thead>
			<tbody>
				<#list pagination.list as c>
				<tr>

					<td>${(pagination.pageNo-1)*pagination.pageSize+1+c_index}</td>
					<td>${c.nickname! }</td>
					<td>${c.telephone!}</td>

					<td>${c.carplate! }</td>
					<td><#if
						(c.createtime)??>${c.createtime?string('yyyy-MM-dd')}</#if></td>
					<td>
						<#if c.enable ?? && c.enable = "Y">  
						   是
						<#else> 
				                     否
						</#if>										
					</td>
		<!-- 			<td>
						<#if c.vip ?? && c.vip = "Y">  
						是
						<#else> 
				                     否
						</#if>										
					</td> -->
					
					<td>
					     <@shiro.hasPermission name="4.1.1"> 
					    <a
						href="${base}/userinfo/detail?userinfoid=${c.id! }"
						class="btn btn-primary">详情</a>
						</@shiro.hasPermission>  
						<#if c.enable=="Y">
						 <@shiro.hasPermission name="4.1.2"> 
						<a
						href="${base}/userinfo/prohibit?userinfoid=${c.id! }&enable=N"
						class="btn btn-primary">禁止用户登录</a>
						</@shiro.hasPermission>
						<#else>
						 <@shiro.hasPermission name="4.1.3"> 
							<a
						href="${base}/userinfo/prohibit?userinfoid=${c.id! }&enable=Y"
						class="btn btn-danger">允许用户登录</a>
						</@shiro.hasPermission>
						</#if>
						
							<#if c.noComment ?? && c.noComment=="Y" &&  c.usermessId ??>
							   
							    	<a
						href="${base}/userinfo/noComment?usermessId=${c.usermessId! }&userinfoid=${c.id! }&noComment=N"
						class="btn btn-danger">允许用户评论</a>
							<#else>
									<a
						href="${base}/userinfo/noComment?usermessId=${c.usermessId! }&userinfoid=${c.id! }&noComment=Y"
						class="btn btn-primary">禁止用户评论</a>
							</#if>
						
						</td>
				</tr>


				</#list> <#if 0==pagination.totalCount>
				<tr>
					<td colspan="7" style="color: red">没有相关数据</td>
				</tr>
				</#if>
				<tr>
					<td colspan="26+1">
						<div style="text-align: left; margin-left: 50px;">
						</div>
					</td>
				</tr>


				<input type="hidden" name="pageNo" value="${pagination.pageNo}" />


			</tbody>
		</table>
		<#include "/view/admin/pagination.html"/>
	</div>


</body>
</html>

<script>
	function setPage(pageNo, pageSize) {
		var href = "${base}/userinfo/list?";

		href += 'telephone=' + $('#telephone').val() + "&";

		href += 'carplate=' + $('#carplate').val();
	/* 	href += "&vip=" + $('#vip').val(); */
		href += "&pageNo=" + pageNo;
		href += "&pageSize=" + pageSize;
		location.href = href;
	}
</script>

